<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<body class="no-skin1">
<form class="layui-form head-form">
    <div style="width: 100%;height: 10px;background: #f6f6f6;"></div>
    <div>
        <table class="layui-hide" id="mjdhtable1" lay-filter="mjtable1"></table>
        <script type="text/html" id="zjtoolbar1">
            <div style="padding: 16px;display: flex;justify-content: space-between;">
                <div  style="font-weight: 700;font-size: 18px;">海外头程装箱清单</div>
            </div>
        </script>
    </div>
</form>



<script th:inline="javascript">
	/*<![CDATA[*/
	var infoItems=[[${infoItems}]];
    var infoItems=infoItems ?infoItems:[]
	var tablecol1=[ [
		{align: 'center',field: 'serial', title: '操作', width: 100 ,fixed: 'left'}
		,{align: 'center',field: 'vDFilesDefault', title: '透明标附件', width: 100,fixed: 'left'}
		,{align: 'center',field: 'isSign', title: '透明标记', width: 100,fixed: 'left'}
        ,{align: 'center',field: 'commodityCode', title: '商品编码', width: 100,fixed: 'left'}
        ,{align: 'center',field: 'nameGoodsCn', title: '商品名称', width: 100,fixed: 'left'}
		,{align: 'center',field: 'nameGoodsCn', title: '商品品名(中文)', width: 100}
		,{align: 'center',field: 'codeGoodsHs', title: '海关编码', width: 100}
		,{align: 'center',field: 'nameMaterialCn', title: '商品材质(中文)', width: 100}
        ,{align: 'center',field: 'priceIn', title: '商品采购价（¥）', width: 100}
        ,{align: 'center',field: 'linkJP', title: '竞品链接', width: 100}
		,{align: 'center',field: 'sku', title: 'SKU', width: 110}
		,{align: 'center',field: 'asin', title: 'ASIN', width: 110}
        ,{align: 'center',field: 'fnsku', title: 'FNSKU', width: 110}
        ,{align: 'center',field: 'numPlanDeliver', title: '计划发货数量', width: 100}
        ,{align: 'center',field: 'numRealityDeliver', title: '实际发货数量', width: 100}
        ,{align: 'center',field: 'numRealityDeliver1', title: '箱子1', width: 95}
        ,{align: 'center',field: 'numRealityDeliver2', title: '箱子2', width: 95}
        ,{align: 'center',field: 'numRealityDeliver3', title: '箱子3', width: 95}
        ,{align: 'center',field: 'numRealityDeliver4', title: '箱子4', width: 95}
        ,{align: 'center',field: 'numRealityDeliver5', title: '箱子5', width: 95}
        ,{align: 'center',field: 'numRealityDeliver6', title: '箱子6', width: 95}
        ,{align: 'center',field: 'numRealityDeliver7', title: '箱子7', width: 95}
        ,{align: 'center',field: 'numRealityDeliver8', title: '箱子8', width: 95}
        ,{align: 'center',field: 'numRealityDeliver9', title: '箱子9', width: 95}
        ,{align: 'center',field: 'numRealityDeliver10', title: '箱子10', width: 95}

    ]]


	var $,layer,form,table,nid,noTable;
    layui.use(['laydate','form','layer','jquery','util','element','upload','table'], function () {
		$ = layui.$, layer = layui.layer, form = layui.form, laydate = layui.laydate, util = layui.util, element = layui.element, upload = layui.upload, table = layui.table;

        // 初始化表格
		$.tablelist.init({
			elem: '#mjdhtable1'
			, data: infoItems
			, page: false
			, even: true
			, limit: 10000
			, totalRow: false
			, cols: tablecol1
			, toolbar: '#zjtoolbar1'
			, height: '550'
            , done: function (res, curr, count) {
                // $('th').css({ 'background-color': '#BCD2EE', 'color': 'black' });//设置th颜色
                //更新装箱清单样式
                var that = this.elem.next();
                res.data.forEach(function (item, index) {
                    if (item.scrapData == "1" && item.serial != "合计") {
                        var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']").css("background-color", '#e5f3fe');
                    } else {
                        var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']").css("background-color", 'white');
                    }
                })
            }
		});
	})

</script>

</body>
</html>